testNumToBytes{
  assertEquals("-12345678",new String(numToBytes(-12345678,false)));
  assertEquals("-1",new String(numToBytes(-1,false)));
  assertEquals("0",new String(numToBytes(0,false)));
  assertEquals("10",new String(numToBytes(10,false)));
  assertEquals("12345678",new String(numToBytes(12345678,false)));
  assertEquals("-1\r\n",new String(numToBytes(-1,true)));
  assertEquals("10\r\n",new String(numToBytes(10,true)));
  assertEquals("12345678\r\n",new String(numToBytes(12345678,true)));
}
benchmark{
      Long.toString(i).getBytes(Charsets.UTF_8);
    long start=System.currentTimeMillis();
      Long.toString(i).getBytes(Charsets.UTF_8);
    total=diff=System.currentTimeMillis() - start;
    long start=System.currentTimeMillis();
    diff-=System.currentTimeMillis() - start;
}
freelsBench{
  baos.write(MultiBulkReply.MARKER);
  baos.write("100\r\n".getBytes());
  for (int i=0; i < 100; i++) {
    baos.write("6\r\n".getBytes());
    baos.write("foobar\r\n".getBytes());
  byte[] multiBulkReply=baos.toByteArray();
  long start=System.currentTimeMillis();
  ByteBuf cb=Unpooled.wrappedBuffer(multiBulkReply);
  for (int i=0; i < 10; i++) {
    for (int j=0; j < 100000; j++) {
    long end=System.currentTimeMillis();
    long diff=end - start;
    System.out.println(diff + " " + ((double)diff) / 100000);
}
